<?

function new_bug()
{
   $bug = array(  'id'      => 0,
                  'date'    => now(),
                  'title'   => '',
                  'rate'    => 1,
                  'status'  => 1,
                  'type_id' => 0,
                  'place_id'=> 0,
                  'user_id' => 0,
                  'comment' => array('id'=>0, 'text' => ''),
                  'level_id'=> _default_level,
                  'tags'    => '',
                  'fav'     => 0
               );
   return $bug;
}

function new_comment($bid)
{
   $c = array( 'id' => 0,
               'date' => now(),
               'ctype_id' => 0,
               'bug_id' => $bid,
               'user_id' => 0,
               'user_name' => 'Name',
               'text' => '',
               'ip' => getenv('REMOTE_ADDR'),
               'isfirst' => 0
             );

   return $c;
}

function new_user_array()
{
   $user = array();

   $user['id']     = 0;
   $user['login']  = 'Login';
   $user['name']   = 'Name';
   $user['email']  = 'user@domain.com';
   $user['comment']= 'position';
   $user['ban']    = 0;
   $user['pass']   = '';
   $user['level_id'] = _default_level;
   $user['level'] = get_userlevel(_default_level);

   return $user;
}

function no_user()
{
   $user = array();

   $user['id']     = 0;
   $user['login']  = '';
   $user['name']   = 'n/a';
   $user['email']  = '';
   $user['comment']= 'The user is not exist';
   $user['ban']    = 0;
   $user['pass']   = '';
   $user['level_id'] = _default_level;
   $user['level'] = get_userlevel(_default_level);

   return $user;
}

?>
